﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Drawing;
using System.Data;
using System.Linq;
using System.Text;
using System.Windows.Forms;

namespace QualityStorm {
    public partial class HourPicker : UserControl {
        public HourPicker() {
            InitializeComponent();
        }

        public DateTime Value {
            get {
                return new DateTime( 2000,1,1, (int)nudHour.Value,
                    (int)nudMinutes.Value,
                    (int)nudSeconds.Value,
                    (int)nudMiliseconds.Value);

            }
            set {
                nudHour.Value = value.Hour;
                nudMinutes.Value = value.Minute;
                nudSeconds.Value = value.Second;
                nudMiliseconds.Value = value.Millisecond;
            }
        }

        public new bool Enabled {
            get {
                return base.Enabled;
            }
            set {
                base.Enabled = value;
                foreach (Control control in this.Controls)
                    control.Enabled = value;
                
            }
        }

    }
}
